package com.swe.chums.dao;

import com.swe.chums.dao.model.CourseRelation;
import com.swe.chums.dao.model.CourseRelationPk;
import com.swe.chums.dao.exceptions.CourseRelationDaoException;
import java.util.List;

public interface CourseRelationDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return CourseRelationPk
	 */
	public CourseRelationPk insert(CourseRelation dto);

	/** 
	 * Updates a single row in the course_relation table.
	 */
	public void update(CourseRelationPk pk, CourseRelation dto) throws CourseRelationDaoException;

	/** 
	 * Deletes a single row in the course_relation table.
	 */
	public void delete(CourseRelationPk pk) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'id = :id'.
	 */
	public CourseRelation findByPrimaryKey(int id) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria ''.
	 */
	public List<CourseRelation> findAll() throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'instructor_id = :instructorId'.
	 */
	public List<CourseRelation> findByWebResource(int instructorId) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'course_id = :courseId'.
	 */
	public List<CourseRelation> findByWebResource2(int courseId) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'institution_id = :institutionId'.
	 */
	public List<CourseRelation> findByWebResource3(int institutionId) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'id = :id'.
	 */
	public List<CourseRelation> findWhereIdEquals(int id) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'course_id = :courseId'.
	 */
	public List<CourseRelation> findWhereCourseIdEquals(int courseId) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'instructor_id = :instructorId'.
	 */
	public List<CourseRelation> findWhereInstructorIdEquals(int instructorId) throws CourseRelationDaoException;

	/** 
	 * Returns all rows from the course_relation table that match the criteria 'institution_id = :institutionId'.
	 */
	public List<CourseRelation> findWhereInstitutionIdEquals(int institutionId) throws CourseRelationDaoException;

	/** 
	 * Returns the rows from the course_relation table that matches the specified primary-key value.
	 */
	public CourseRelation findByPrimaryKey(CourseRelationPk pk) throws CourseRelationDaoException;

}
